package com.javaee.xiangyang.entity.enmu.impl;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.javaee.xiangyang.entity.enmu.BaseStateEnum;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OrderState implements BaseStateEnum {
    UNDELIVERED(1, "未发货"),
    DELIVERED(2, "已发货"),
    RECEIVED(3, "已接收"),
    CANCEL(4, "取消订单申请中"),
    SUCCESSFULLY_CANCELLED(5, "已取消"),
    FAILED_CANCELLATION(6, "取消失败");;

    private int orderStateId;
    private String orderState;

    @Override
    @JsonIgnore
    public int getCode() {
        return this.orderStateId;
    }

    OrderState(int orderStateId, String orderState) {
        this.orderStateId = orderStateId;
        this.orderState = orderState;
    }

    public int getOrderStateId() {
        return orderStateId;
    }

    public void setOrderStateId(int orderStateId) {
        this.orderStateId = orderStateId;
    }

    public String getOrderState() {
        return orderState;
    }

    public void setOrderState(String orderState) {
        this.orderState = orderState;
    }
}
